#include <func.h>

int main(int argc, char* argv[])
{
    ARGS_CHECK(argc, 2);
    int fdw = open(argv[1], O_WRONLY);
    ERROR_CHECK(fdw, -1, "open");
    printf("fdw = %d\n", fdw);
    char buf[128] = {0};
    read(STDIN_FILENO, buf, sizeof(buf));
    write(fdw, buf, strlen(buf));
    return 0;
}